package com.nondo.dean.platform.mapper;

import com.nondo.dean.common.mybatis.Table;
import com.nondo.dean.platform.domain.SignIn;
import com.nondo.dean.platform.domain.SignInExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

@Table("sign_in")
@Mapper
public interface SignInMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SignInSqlProvider.class, method="countByExample")
    long countByExample(SignInExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @DeleteProvider(type=SignInSqlProvider.class, method="deleteByExample")
    int deleteByExample(SignInExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Delete({
        "delete from sign_in",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Insert({
        "insert into sign_in (sign_in, customer_id, ",
        "create_by, create_date, ",
        "update_by, update_date)",
        "values (#{signIn,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER}, ",
        "#{createBy,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(SignIn record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @InsertProvider(type=SignInSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(SignIn record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SignInSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="sign_in", property="signIn", jdbcType=JdbcType.INTEGER),
        @Result(column="customer_id", property="customerId", jdbcType=JdbcType.INTEGER),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<SignIn> selectByExampleWithRowbounds(SignInExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @SelectProvider(type=SignInSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="sign_in", property="signIn", jdbcType=JdbcType.INTEGER),
        @Result(column="customer_id", property="customerId", jdbcType=JdbcType.INTEGER),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<SignIn> selectByExample(SignInExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Select({
        "select",
        "id, sign_in, customer_id, create_by, create_date, update_by, update_date",
        "from sign_in",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="sign_in", property="signIn", jdbcType=JdbcType.INTEGER),
        @Result(column="customer_id", property="customerId", jdbcType=JdbcType.INTEGER),
        @Result(column="create_by", property="createBy", jdbcType=JdbcType.BIGINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_by", property="updateBy", jdbcType=JdbcType.BIGINT),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    SignIn selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SignInSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") SignIn record, @Param("example") SignInExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SignInSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") SignIn record, @Param("example") SignInExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @UpdateProvider(type=SignInSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(SignIn record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign_in
     *
     * @mbg.generated Wed May 30 13:56:22 CST 2018
     */
    @Update({
        "update sign_in",
        "set sign_in = #{signIn,jdbcType=INTEGER},",
          "customer_id = #{customerId,jdbcType=INTEGER},",
          "create_by = #{createBy,jdbcType=BIGINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_by = #{updateBy,jdbcType=BIGINT},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(SignIn record);
}